<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mesog/mesogs/MesOgs.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mesog/mesogs/MesOgs.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'OgId',
                footer: "Foots",
                cnName: '外协管理',
                name: 'mesogs/MesOgs',
                url: "/MesOgs/",
                sortName: "OgId"
            });
            const editFormFields = ref({"OgId":"","OgNo":"","ProductionNo":"","Ogunit":"","OgexpectedTime":"","Ognotes":"","OgSumPrice":"","OgorderNo":"","OgProduct":"","OgSum":"","OgShipped":"","OgReceived":"","OgUnqualified":"","OgthisNum":"","MoneyId":"","OgReceivingshipping":"","OgDateTime":"","Ogdeliverytime":"","User_Id":"","Or_id":"","Pro_no":"","Ogsettlement":"","OgovDays":""});
            const editFormOptions = ref([[{"title":"主键","required":true,"field":"OgId","type":"number"},
                               {"title":"外协编号","field":"OgNo"}],
                              [{"title":"生产编号","field":"ProductionNo"},
                               {"title":"单位","field":"Ogunit"}],
                              [{"title":"预计日期","field":"OgexpectedTime"},
                               {"title":"备注","field":"Ognotes"}],
                              [{"title":"总价格","field":"OgSumPrice","type":"number"},
                               {"title":"订单编码","field":"OgorderNo"}],
                              [{"title":"品名","field":"OgProduct"},
                               {"title":"总数","field":"OgSum","type":"number"}],
                              [{"title":"已发货数量","field":"OgShipped","type":"number"},
                               {"title":"已收到合格数","field":"OgReceived","type":"number"}],
                              [{"title":"不合格数","field":"OgUnqualified","type":"number"},
                               {"title":"本次数量","field":"OgthisNum","type":"number"}],
                              [{"title":"币式Id","field":"MoneyId","type":"number"},
                               {"title":"收发货","field":"OgReceivingshipping","type":"number"}],
                              [{"title":"创建时间","field":"OgDateTime"},
                               {"title":"发货时间","field":"Ogdeliverytime"}],
                              [{"title":"收货人","field":"User_Id","type":"number"},
                               {"title":"订单Id","field":"Or_id","type":"number"}],
                              [{"title":"产品编号","field":"Pro_no","type":"number"},
                               {"title":"结算状态","field":"Ogsettlement","type":"number"}],
                              [{"title":"逾期天数","field":"OgovDays","type":"number"}]]);
            const searchFormFields = ref({"OgNo":"","ProductionNo":"","Ogunit":"","Ogsettlement":""});
            const searchFormOptions = ref([[{"title":"外协编号","field":"OgNo"},{"title":"生产编号","field":"ProductionNo"},{"title":"单位","field":"Ogunit"},{"title":"结算状态","field":"Ogsettlement","type":"number"}]]);
            const columns = ref([{field:'OgNo',title:'外协编号',type:'string',width:220,align:'left',sort:true},
                       {field:'ProductionNo',title:'生产编号',type:'string',width:220,align:'left'},
                       {field:'Ogunit',title:'单位',type:'string',width:220,align:'left'},
                       {field:'OgexpectedTime',title:'预计日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Ognotes',title:'备注',type:'string',width:220,align:'left'},
                       {field:'OgSumPrice',title:'总价格',type:'int',width:110,align:'left'},
                       {field:'OgorderNo',title:'订单编码',type:'string',width:220,align:'left'},
                       {field:'OgProduct',title:'品名',type:'string',width:220,align:'left'},
                       {field:'OgSum',title:'总数',type:'int',width:110,align:'left'},
                       {field:'OgShipped',title:'已发货数量',type:'int',width:110,align:'left'},
                       {field:'OgReceived',title:'已收到合格数',type:'int',width:110,align:'left'},
                       {field:'OgUnqualified',title:'不合格数',type:'int',width:110,align:'left'},
                       {field:'OgthisNum',title:'本次数量',type:'int',width:110,align:'left'},
                       {field:'MoneyId',title:'币式Id',type:'int',width:110,align:'left'},
                       {field:'OgReceivingshipping',title:'收发货',type:'int',width:110,align:'left'},
                       {field:'OgDateTime',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Ogdeliverytime',title:'发货时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'User_Id',title:'收货人',type:'int',width:110,align:'left'},
                       {field:'Or_id',title:'订单Id',type:'int',width:110,align:'left'},
                       {field:'Pro_no',title:'产品编号',type:'int',width:110,align:'left'},
                       {field:'Ogsettlement',title:'结算状态',type:'int',width:110,align:'left'},
                       {field:'OgovDays',title:'逾期天数',type:'int',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
